package com.example.zhu29.bledemo.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.example.zhu29.bledemo.R;

import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * 作者: zhudewei
 * 时间: 2018/3/1
 * code is never no bug
 */

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.btn1, R.id.btn2, R.id.btn3})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn1:
                startActivity(new Intent(this, BloodSugarActivity.class));
                break;
            case R.id.btn2:
                startActivity(new Intent(this, BloodPressureActivity.class));
                break;
            case R.id.btn3:
                startActivity(new Intent(this, ThermometerActivity.class));
                break;
        }
    }
}
